package com.zq.create.abstract_factory;

public interface AbstractProductA {
    void interact(AbstractProductB product);
}

class ProductA1 implements AbstractProductA {

    @Override
    public void interact(AbstractProductB product) {
        System.out.println("ProductA1 is interacting with ProductB1.");
        product.exec();
    }
}

class ProductA2 implements AbstractProductA {

    @Override
    public void interact(AbstractProductB product) {
        System.out.println("ProductA2 is interacting with ProductB2.");
        product.exec();
    }
}
